package com.link.gateway.microservice;

import com.link.gateway.microservice.config.ConfigConst;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author: 戴晨雨
 *
 * @date: 2019/1/29
 * @description:
 */

@FeignClient(value = ConfigConst.LINK_AUTH)
public interface MicroAuthService {

    @PostMapping(value = "/users/current")
    String checkToken(@RequestHeader(value = "Authorization") String authmsg);


    @PostMapping(value = "/oauth/token")
    String getToken(@RequestHeader(value = "Authorization") String authMessage,
                    @RequestParam("parameters") Map<String, String> parameters);

}
